#ifndef TCPSERVER_H
#define TCPSERVER_H

#include <QDialog>
#include <QtNetwork>
#include <QTcpServer>

namespace Ui {
class TcpServer;
}

class TcpServer : public QDialog
{
    Q_OBJECT

public:
    explicit TcpServer(QWidget *parent = 0);
    ~TcpServer();
    QTcpServer *server;
    QTcpSocket *clientConnection;

private slots:
    void on_pushButton_clicked();
    void acceptConnection();
    void readClient();

    void on_pushButton_2_clicked();

private:
    Ui::TcpServer *ui;
    void dataSend();


};

#endif // TCPSERVER_H
